package VacationHomework.LeetCode;

public class Num328 {
    public ListNode oddEvenList(ListNode head) {
        if(head==null){
            return head;
        }
        ListNode jiHead=head;
        ListNode ouHead=head.next;
        ListNode slow=jiHead;
        ListNode fast= ouHead;
        while (fast!=null && fast.next!=null){
            slow.next=slow.next.next;
            slow=slow.next;
            fast.next=fast.next.next;
            fast=fast.next;
        }
        slow.next=ouHead;
        return jiHead;

    }
}
